﻿import Rhino.Commons.Binsor
import Rhino.Commons
import System.Reflection
import Castle.Core
import NHibernateDemo.Core
import NHibernateDemo.DAL

Component("NHibernateSessionManager", INHibernateSessionManager, NHibernateSessionManager)
Component("SessionManager", INHibernateSessionManager, NHibernateSessionManager)
dalAssembly = Assembly.Load("NHibernateDemo.DAL")

Component("Repository", ITransactionRepository, Repository)
Component("NinjaRepository", INinjaRepository, NinjaRepository)

for type in dalAssembly.GetTypes():
	if typeof(ITransactionRepository).IsAssignableFrom(type.BaseType):
		Component(type.Name, type)
		